QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Selecting Data Handlers

GetDataHandler

The GetDataHandler function allows you to retrieve the best data handler component to use with a given data reference.

pascal Component GetDataHandler (Handle dataRef, OSType dataHandlerSubType, long flags);
dataRef
Contains a handle to the data reference. The type of information stored in the handle depends upon the data reference type specified by the dataHandlerSubType parameter.
dataHandlerSubType
Identifies both the type of data reference and, by implication, the component subtype value assigned to the data handler components that operate on data references of that type.
flags
Indicates the way in which you intend to use the data handler component. Note that not all data handlers necessarily support all services--for example, some data handler components may not support streaming writes.
The following flags are defined (set the appropriate flags to 1):
kDataHCanRead
Specifies that you intend to use the data handler component to read data.
kDataHCanWrite
Specifies that you intend to use the data handler component to write data.
kDataHCanStreamingWrite
Indicates that you intend to do streaming writes (as part of a movie-capture operation, for example).

Description

Once you have used this function to get information about the best data handler component for your data reference, you can open and use the component using Component Manager functions. See "Data Handler Components," for more information.

If the function returns a value of nil , the toolbox was unable to find an appropriate data handler component. For more information about the error, call the GetMoviesError toolbox function.

RESULT CODES

Memory Manager errors


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |